package com.gy.smart.handle.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.gy.smart.R;
import com.gy.smart.handle.bean.HandleServiceBean;

import java.util.List;

/**
 * 作者：gy on 17/1/4
 * 说明：
 */
public class HandleServiceAdapter extends BaseAdapter {

    private Context context;
    private List<HandleServiceBean> mDatas;

    public HandleServiceAdapter(Context context,List<HandleServiceBean> mDatas){
        this.context = context;
        this.mDatas = mDatas;
    }

    @Override
    public int getCount() {
        return mDatas.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        convertView = View.inflate(context, R.layout.adapter_handle_service,null);
        TextView tvName = (TextView) convertView.findViewById(R.id.adapter_handle_service_tv);
        tvName.setText(mDatas.get(position).section_name+"");
        return convertView;
    }
}
